package com.woniu.gf.pawn.management.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.gf.pawn.comm.core.domain.Management;
import com.woniu.gf.pawn.comm.core.domain.Permission;
import com.woniu.gf.pawn.comm.core.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Lucas
 * @since 2020-10-13
 */
public interface RoleMapper extends BaseMapper<Role> {
    List<Management> selectManagementByRoleId(@Param("roleId") int roleId, @Param("managementName") String managementName);

    List<Management> selectManagementNotRoleByRoleId(@Param("roleId") int roleId, @Param("managementName") String managementName);


    void deleteManagementRoleByRoleId(int roleId);

    IPage<Role> selectPageRole(Page<Role> page, @Param("roleName") String roleName);

    void deleteRolePermissionByRoleId(int roleId);

    List<Permission> selectPermissionByRoleId(@Param("roleId") int roleId,@Param("permissionCategoryId") int permissionCategoryId, @Param("permissionName") String permissionName);

    List<Permission> selectPermissionNotByRoleId(@Param("roleId") int roleId,@Param("permissionCategoryId") int permissionCategoryId, @Param("permissionName") String permissionName);
}
